A container technology is a technology of resource isolation and resource allocation. Different process groups are allocated to different containers in order to implement isolation between process groups in the different containers and resource allocation between the different containers.
The different containers include different process groups, and the different process groups may have different resource requirements. Therefore, the different containers may have different resource requirements. For example, some containers need to occupy relatively large bandwidth and need a relatively fast response speed, and some containers need to occupy relatively small bandwidth and have a relatively low requirement on a response speed. Resource requirements of a process group in a container on different resources are referred to as QoS of the container.
During implementation of the present disclosure, other approaches have the following disadvantages. An existing computer cannot perform corresponding QoS control on a container when the container occupies or accesses a hardware device, as a result, resource requirements of a process group in the container cannot be met.